package com.xiaoyun.pojo.bo;

import com.xiaoyun.pojo.group.EditNickname;
import com.xiaoyun.pojo.group.UploadImg;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;

@Data
public class UsersBO {

    @NotBlank(message = "用户id不能为空")
    private String userId;
    @NotEmpty(groups = {UploadImg.class}, message = "图片不能为空")
    private String faceData;

    @NotBlank(groups = {EditNickname.class}, message = "用户名不能为空")
    @Length(groups = {EditNickname.class}, max = 12, message = "用户名长度不能超过12")
    private String nickname;

}
